home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
amac44b.zip
/
DAT003.QM
< prev
next >
Wrap
Text File
|
1992-05-27
|
20KB
|
384 lines
* dat003.qm
* Written By Tom Hogshead
* [ See DATExx.QM For Use ]
* 5/12/92
* Bytes
* Key Subfile Description/Output Small Fast
* ===== =============== ========================================== ==== ====
* @(3) 5:26 pm 53
* @(0) | 252
* ( no comma)
* ^(f1_) Tom Hogshead Friday, May 8, 1992 at 11:27 am 163
* @(f7) Tom Hogshead, Friday, May 8, 1992 at 11:27 am 164
* @(f8) | 890
*
* {e:\up\DATE*}--Return To DATExx.QM BEST
*
*-- eoi
* M A C R O S
* ----------------------------------------------------------------------
* @(3) Time in Standard '5:26 pm', not Military '17:26:37',
* Uses Data File $time, Small
* ----------------------------------------------------------------------
* The data file $time must exist in the current directory or change
* "d:\path\" to your path containing $date to execute in any
* directory. This macro will fit on one line of Qconfig.dat. File
* $time contains:
* ┌─────────────────────────────────────────────────────────────────────┐
* │$time │
* │01 1 am 02 2 am 03 3 am 04 4 am 05 5 am 06 6 am 07 7 am 08 8 am│
* │09 9 am 10 10 am 11 11 am 12 12 pm 13 1 pm 14 2 pm 15 3 pm 16 4 pm│
* │17 5 pm 18 6 pm 19 7 pm 20 8 pm 21 9 pm 22 10 pm 23 11 pm 00 12 am│
* └─────────────────────────────────────────────────────────────────────┘
@3 macrobegin setscreenoff defaultwordset splitline
inserttime delltword delltword delltword * Delete ":secs "
wordleft wordleft markword cut * Cut 24 hour # to scrap
onewindow horizontalwindow * Setup window for $time
editfile
* "d:\path\" * Change to your path for "$time"
"$time" return
find paste return delline return * Find 24 hour #
wordright markcolumn wordright cursorright * Mark 12 hour and am/pm
copy quit prevwindow onewindow paste * Copy/quit/paste data
wordright markword cursorleft markcolumn * Mark " am/pm"
endline moveblock * Move it where it belongs
endline cursorright joinline unmarkblock * Clean up and pos cursor
*
* 53 bytes Tue 04-14-1992 13:48:41 (TH @3)
* 53 bytes Tue 05-12-1992 09:15:06 (TH @3, changed description)
* * The following Qmac compiled version of @3 will fit on one line of
* * Qconfig.dat:
*
* @3 MacroBegin SetScreenOff DefaultWordSet SplitLine InsertTime DelLtWord
* DelLtWord DelLtWord WordLeft WordLeft MarkWord Cut OneWindow
* HorizontalWindow EditFile "$time" Return Find Paste Return DelLine
* Return WordRight MarkColumn WordRight CursorRight Copy Quit PrevWindow
* OneWindow Paste WordRight MarkWord CursorLeft MarkColumn EndLine
* MoveBlock EndLine CursorRight JoinLine UnmarkBlock
* 53 bytes Tue 04-14-1992 13:48:41 (TH @3)
*
* ----------------------------------------------------------------------
* @(0) Time in Standard '5:26 pm', not Military '17:26:37'
* ----------------------------------------------------------------------
* This macro is a modification of Tim Farley's @3 macro in message
* #2953 on SemWare ILink Conference 21, dated 9/17/90. I modified it
* to work properly if run with cursor between text, and also shortened
* it a few bytes.
@0 Macrobegin
setscreenoff defaultwordset splitline inserttime
delltword delltword delltword wordleft wordleft
unmarkblock markcharacter cursorright
find "0" return "lb" return jfalse AFTER10
delch jump am
AFTER10:
markcolumn cursorleft
FindReplace "10" Return "10" Return "ln" Return JTrue am
FindReplace "11" Return "11" Return "ln" Return JTrue am
FindReplace "13" Return "1" Return "ln" Return
FindReplace "14" Return "2" Return "ln" Return
FindReplace "15" Return "3" Return "ln" Return
FindReplace "16" Return "4" Return "ln" Return
FindReplace "17" Return "5" Return "ln" Return
FindReplace "18" Return "6" Return "ln" Return
FindReplace "19" Return "7" Return "ln" Return
FindReplace "20" Return "8" Return "ln" Return
FindReplace "21" Return "9" Return "ln" Return
FindReplace "22" Return "10" Return "ln" Return
FindReplace "23" Return "11" Return "ln" Return
jump pm
am:
endline cursorright "am" cursorright jump end
pm:
endline cursorright "pm" cursorright
end:
joinline unmarkblock
*
* 265 bytes Mon 04-01-1991 10:47:26 (Tim Farley)
* 266 bytes Wed 04-08-1992 20:49:41 (TH @0, added setscreenoff)
* 258 bytes Sat 04-11-1992 10:36:17 (TH @0, added split|joinline, shortened)
* 259 bytes Mon 04-13-1992 11:43:47 (TH @0, added defaultwordset)
* 252 bytes Tue 04-14-1992 14:00:37 (TH @0, shortened)
*
* ----------------------------------------------------------------------
* ^(f1_) Name, Date and Time in Following Format:
* "Tom Hogshead, Thursday, April 9, 1992 at 11:15 am"
* Uses Data Files $date and $time, Small
* ----------------------------------------------------------------------
* The data files $date and $time must exist in the current directory
* or change "d:\path\" to your path containing these files to
* execute in any directory. Files $date and $time contain:
* ┌──────────────────────────────────────────────────────────────────┐
* │$date │
* │Mon Monday Tue Tuesday Wed Wednesday Thu Thursday Fri Friday│
* │Sat Saturday Sun Sunday 01 January 02 February 03 March │
* │04 April 05 May 06 June 07 July 08 August │
* │09 September 10 October 11 November 12 December │
* └──────────────────────────────────────────────────────────────────┘
*
* ┌─────────────────────────────────────────────────────────────────────┐
* │$time │
* │01 1 am 02 2 am 03 3 am 04 4 am 05 5 am 06 6 am 07 7 am 08 8 am│
* │09 9 am 10 10 am 11 11 am 12 12 pm 13 1 pm 14 2 pm 15 3 pm 16 4 pm│
* │17 5 pm 18 6 pm 19 7 pm 20 8 pm 21 9 pm 22 10 pm 23 11 pm 00 12 am│
* └─────────────────────────────────────────────────────────────────────┘
^f1 macrobegin
* === Insert Date Tuesday, April 14, 1992 at 3:28 pm, From @2 DATE*.QM ===*
setscreenoff setinsmode defaultwordset
"Tom Hogshead" **** change to your name ****
cursorright cursorright
insertdate
* ------------------------ Remove Second Dash ------------------------*
wordleft toggleinsert backspace wordleft
* ------------------ Remove Day Number Leading Zero ------------------*
unmarkblock markcolumn * Mark day digit 1
findreplace
"0" return delline return "ln" return * Remove leading zero
* ------------------------ Remove First Dash ------------------------*
backspace wordleft wordleft toggleinsert
* ------------------------- Expand Day Name -------------------------*
markword cut onewindow horizontalwindow
editfile
* "d:\path\" * Change to your path for "$date"
"$date" return
find paste return delline return
wordright markword copy prevwindow paste
* ------------------- Insert Comma After Day Name -------------------*
gotoblockend "," delch * Remove to NOT put comma after day name
* ------------------ Replace Month Number with Name ------------------*
wordright markword cut nextwindow
find paste return delline return
wordright markword copy quit prevwindow onewindow paste
* ------------------ Insert Comma After Day Number ------------------*
gotoblockend wordright markword gotoblockend "," wordright
markword gotoblockend cursorright * unmarkblock
"at" cursorright
* ========= Insert Time In 3:27 pm Format, From @3 dat002.qm =========*
splitline
inserttime delltword delltword delltword * Delete ":secs "
wordleft wordleft markword cut * Cut 24 hour # to scrap
onewindow horizontalwindow * Setup window for $time
editfile
* "d:\path\" * Change to your path for "$time"
"$time" return
find paste return delline return * Find 24 hour #
wordright markcolumn wordright cursorright * Mark 12 hour and am/pm
copy quit prevwindow onewindow paste * Copy/quit/paste data
wordright markword cursorleft markcolumn * Mark " am/pm"
endline moveblock * Move it where it belongs
endline cursorright joinline unmarkblock * Clean up and pos cursor
*
* 163 bytes Wed 04-15-1992 09:46:15 (TH ^f1)
* 163 bytes Tue 05-12-1992 09:14:44 (TH ^f1, changed description)
*
* ----------------------------------------------------------------------
* @(f7) Name, Date and Time in Following Format:
* "Tom Hogshead, Thursday, April 9, 1992 at 11:15 am"
* Uses Data Files $date and $time, Small
* ----------------------------------------------------------------------
* The data files $date and $time must exist in the current directory
* or change "d:\path\" to your path containing these files to
* execute in any directory. Files $date and $time contain:
* ┌──────────────────────────────────────────────────────────────────┐
* │$date │
* │Mon Monday Tue Tuesday Wed Wednesday Thu Thursday Fri Friday│
* │Sat Saturday Sun Sunday 01 January 02 February 03 March │
* │04 April 05 May 06 June 07 July 08 August │
* │09 September 10 October 11 November 12 December │
* └──────────────────────────────────────────────────────────────────┘
*
* ┌─────────────────────────────────────────────────────────────────────┐
* │$time │
* │01 1 am 02 2 am 03 3 am 04 4 am 05 5 am 06 6 am 07 7 am 08 8 am│
* │09 9 am 10 10 am 11 11 am 12 12 pm 13 1 pm 14 2 pm 15 3 pm 16 4 pm│
* │17 5 pm 18 6 pm 19 7 pm 20 8 pm 21 9 pm 22 10 pm 23 11 pm 00 12 am│
* └─────────────────────────────────────────────────────────────────────┘
@f7 macrobegin
* === Insert Date Tuesday, April 14, 1992 at 3:28 pm, From @2 DATE*.QM ===*
setscreenoff setinsmode defaultwordset
"Tom Hogshead," **** change to your name ****
cursorright
insertdate
* ------------------------ Remove Second Dash ------------------------*
wordleft toggleinsert backspace wordleft
* ------------------ Remove Day Number Leading Zero ------------------*
unmarkblock markcolumn * Mark day digit 1
findreplace
"0" return delline return "ln" return * Remove leading zero
* ------------------------ Remove First Dash ------------------------*
backspace wordleft wordleft toggleinsert
* ------------------------- Expand Day Name -------------------------*
markword cut onewindow horizontalwindow
editfile
* "d:\path\" * Change to your path for "$date"
"$date" return
find paste return delline return
wordright markword copy prevwindow paste
* ------------------- Insert Comma After Day Name -------------------*
gotoblockend "," delch * Remove to NOT put comma after day name
* ------------------ Replace Month Number with Name ------------------*
wordright markword cut nextwindow
find paste return delline return
wordright markword copy quit prevwindow onewindow paste
* ------------------ Insert Comma After Day Number ------------------*
gotoblockend wordright markword gotoblockend "," wordright
markword gotoblockend cursorright
"at" cursorright
* ========= Insert Time In 3:27 pm Format, From @3 dat002.qm =========*
splitline
inserttime delltword delltword delltword * Delete ":secs "
wordleft wordleft markword cut * Cut 24 hour # to scrap
onewindow horizontalwindow * Setup window for $time
editfile
* "d:\path\" * Change to your path for "$time"
"$time" return
find paste return delline return * Find 24 hour #
wordright markcolumn wordright cursorright * Mark 12 hour and am/pm
copy quit prevwindow onewindow paste * Copy/quit/paste data
wordright markword cursorleft markcolumn * Mark " am/pm"
endline moveblock * Move it where it belongs
endline cursorright joinline unmarkblock * Clean up and pos cursor
*
* 164 bytes Tue 04-14-1992 22:55:11 (TH @f7)
* 164 bytes Tue 05-12-1992 09:16:05 (TH @f7, changed description)
*
* ----------------------------------------------------------------------
* @(f8) Name, Date and Time in Following Format:
* "Tom Hogshead, Thursday, April 9, 1992 at 11:15 am"
* ----------------------------------------------------------------------
* This macro is based on @f6 by Mel Hulse.
@f8 macrobegin
setscreenoff setinsmode
UnmarkBlock * Housekeeping
DefaultWordSet * "
* ----------------------- insert name and date -----------------------*
"Tom Hogshead," **** change to your name ****
cursorright
InsertDate * Places system date at the cursor position
PrevPosition * Goto front of date string
*------ vvvv If you don't want day spelled out, DELETE FROM HERE ----*
MarkWord * Mark the abreviated day
*------ Replace Day with spelled out name within the marked block----*
FindReplace"Mon" Return "Monday, " Return "LN" Return
FindReplace"Tue" Return "Tuesday, " Return "LN" Return
FindReplace"Wed" Return "Wednesday, " Return "LN" Return
FindReplace"Thu" Return "Thursday, " Return "LN" Return
FindReplace"Fri" Return "Friday, " Return "LN" Return
FindReplace"Sat" Return "Saturday, " Return "LN" Return
FindReplace"Sun" Return "Sunday, " Return "LN" Return
Month: * Target for jump
*--------------------------------------------------------------------*
GotoBlockEnd * Goto the 2 spaces after the day
*------ ^^^^ TO HERE, ----------------------------------------------*
DelRtWord * Delete spaces if Q is configured to...
* delete following white space...
* (Delete day, if your not using it)
UnmarkBlock * Un mark
MarkWord
*------ Replace Month number with Name -----------------------------*
FindReplace"01" Return "January " Return "LN" Return
FindReplace"02" Return "February " Return "LN" Return
FindReplace"03" Return "March " Return "LN" Return
FindReplace"04" Return "April " Return "LN" Return
FindReplace"05" Return "May " Return "LN" Return
FindReplace"06" Return "June " Return "LN" Return
FindReplace"07" Return "July " Return "LN" Return
FindReplace"08" Return "August " Return "LN" Return
FindReplace"09" Return "September " Return "LN" Return
FindReplace"10" Return "October " Return "LN" Return
FindReplace"11" Return "November " Return "LN" Return
FindReplace"12" Return "December " Return "LN" Return
GotoBlockEnd * Go to the space after month
UnmarkBlock * Un mark
Delch * Delete hyphen
*------ Remove Zero in Day Number -----------------------------------*
CursorLeft * Ready for 2 character find...
DropAnchor * Mark 1st...
CursorRight * and second...
DropAnchor * characters
GotoBlockBeg * And go to block's start
FindReplace " 0" Return " " Return "LN" Return * Find a "0" and delete it
GoToBlockEnd * Go toward hyphen
UnmarkBlock * Un mark
CursorRight * And one character more
Delch ", " * Delete hyphen & add comma and space
*--------------------------------------------------------------------*
MarkWord * Mark the year
GotoBlockEnd * Go to the space after the year
UnmarkBlock * Un mark
DelCh * Delete 1 character at years end
*------- Delete after here if time not wanted -----------------------*
* Time: "12:36 pm ", not "12:36:18 "
* -------------------------------------------------------------------*
AltWordSet * Housekeeping - Turn back to DefaultWordSet ....
" at "
InsertTime * Insert the time
Backspace * Backspaces...
Backspace * over...
Backspace * the...
Backspace * seconds
CursorLeft * Go to the end of time
MarkWord * Mark time
GotoBlockBeg * Go to the beginning of time
UnmarkBlock * Un mark
CursorLeft * And 1 character before time
DropAnchor * Mark the...
CursorRight * 1st 2 characters...
DropAnchor * of the hour
CursorLeft * See if it's a "0" and delete it
FindReplace " 0" Return " " Return "ln" Return JTrue am
GoToBlockEnd * Otherwise, convert the hour
UnmarkBlock * Un mark the find block
DropAnchor * Mark...
CursorLeft * the...
DropAnchor * hour
CursorLeft * Go past 1st character
* Look for each 2 digit hour, 11 or less & go to "am"...
FindReplace "10" Return "10" Return "ln" Return JTrue am
FindReplace "11" Return "11" Return "ln" Return JTrue am
* ...or convert it to the 12 hour clock
FindReplace "13" Return "1" Return "ln" Return
FindReplace "14" Return "2" Return "ln" Return
FindReplace "15" Return "3" Return "ln" Return
FindReplace "16" Return "4" Return "ln" Return
FindReplace "17" Return "5" Return "ln" Return
FindReplace "18" Return "6" Return "ln" Return
FindReplace "19" Return "7" Return "ln" Return
FindReplace "20" Return "8" Return "ln" Return
FindReplace "21" Return "9" Return "ln" Return
FindReplace "22" Return "10" Return "ln" Return
FindReplace "23" Return "11" Return "ln" Return
Jump pm * ...and go to "pm"
am: * Target
GotoBlockEnd * Get past time
UnmarkBlock * Un mark the find block
MarkWord GotoBlockEnd UnmarkBlock * Go to the end of time
" am" * Enter "am"
Jump end * Quit
pm: * Target
GotoBlockEnd * Get past time
UnmarkBlock * Un mark the find block
MarkWord GotoBlockEnd UnmarkBlock * Go to the end of time
" pm" * Enter "pm"
end: * Quit target
CursorRight * Put the cursor where user wants it
DefaultWordSet * Put it back where it probably was
*
* 861 bytes, Sunday, April 7, 1991 at 12:41 am (@5 macro)
* 890 bytes Thu 04-11-1991 23:13:32 added name
* 892 bytes Thu 04-09-1992 11:16:01 (TH @f8, added setscreenoff/setinsmode)
* 890 bytes Tue 04-14-1992 17:08:36 (TH @f8, shortened)
*--eof